/**
 * 
 */
package test;

/**
 * @author Administrator
 * 
 */
public class StringRotation {
    public static String rotateString(String A, int n, int p) {
        // write code here
        String A1 = A.substring(0, p);
        String A2 = A.substring(p + 1, n);
 
        return  A2 + A1;
    }
    
    public static void main(String[] args) {
        System.out.println(rotateString("12345678", 8, 4));
    }
}
